package com.wealth.lottery.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
 * 抽奖商品
 * @author lihang 2016-06-27
 *
 */

import com.wealth.system.entity.Corporation;

@Entity
@Table(name="lottery_prize")
public class LotteryPrize  implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private Long id; //主键id
	private String name; //商品名称
	private Double probability; //抽奖概率
	private int level; //奖品等级
	private int total; //已中奖数
	private int maxsum; //奖品数量
	private int stock;  //库存
	private int daysum; //每天中奖数设置
	private String contents; //详细描述
	private String remark; //备注
	private String picurl;//图片路径
	private int type; //奖品类型：1：实物，2：积分
	private int score; // 奖品积分
	private Date creatTime;//创建时间create_time
	private String creator; //创建人
	/**抽奖参数*/
	private int ordernum; //随机初始数
	private int lucknum;//中奖号码
	private int  lucknumber; // 中奖次数
	private String  orderlucknum;//已经中奖的号码
	
	private Corporation corp; //企业id corp_id
	private LotteryActivity lotteryactivity; //活动id LotteryActivity
	
	
	
	public LotteryPrize(Long id) {
		super();
		this.id = id;
	}
	public LotteryPrize() {
		super();
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Double getProbability() {
		return probability;
	}
	public void setProbability(Double probability) {
		this.probability = probability;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public int getMaxsum() {
		return maxsum;
	}
	public void setMaxsum(int maxsum) {
		this.maxsum = maxsum;
	}
	public int getDaysum() {
		return daysum;
	}
	public void setDaysum(int daysum) {
		this.daysum = daysum;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getPicurl() {
		return picurl;
	}
	public void setPicurl(String picurl) {
		this.picurl = picurl;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	@Column(name="create_time")
	public Date getCreatTime() {
		return creatTime;
	}
	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	@ManyToOne
	@JoinColumn(name="corp_id")
	public Corporation getCorp() {
		return corp;
	}
	public void setCorp(Corporation corp) {
		this.corp = corp;
	}
	@ManyToOne
	@JoinColumn(name="lottery_id")
	public LotteryActivity getLotteryactivity() {
		return lotteryactivity;
	}
	public void setLotteryactivity(LotteryActivity lotteryactivity) {
		this.lotteryactivity = lotteryactivity;
	}
	public int getStock() {
		return stock;
	}
	public void setStock(int stock) {
		this.stock = stock;
	}
	@Column(name="lucknum")
	public int getLucknum() {
		return lucknum;
	}
	public void setLucknum(int lucknum) {
		this.lucknum = lucknum;
	}
	public int getLucknumber() {
		return lucknumber;
	}
	public void setLucknumber(int lucknumber) {
		this.lucknumber = lucknumber;
	}
	public String getOrderlucknum() {
		return orderlucknum;
	}
	public void setOrderlucknum(String orderlucknum) {
		this.orderlucknum = orderlucknum;
	}
	public int getOrdernum() {
		return ordernum;
	}
	public void setOrdernum(int ordernum) {
		this.ordernum = ordernum;
	}
	
	
}
